home *** CD-ROM | disk | FTP | other *** search
- ;; -*- Mode: Emacs-Lisp -*-
- ;; File: man-frames.el
- ;; Description: extension to man.el for X frames
- ;; Author: Dave Goldberg (dsg@mitre.org)
- ;; Derived from: esuperman.el by Colin Rafferty (craffert@lehman.com)
- ;; Last Modified: 5-November-1993
- ;; Version: 1.2
- ;;
-
- ;; ========== Standard Disclaimer ==========
- ;; This file is not part of the GNU Emacs distribution (yet).
-
- ;; This file is distributed in the hope that it will be useful, but
- ;; WITHOUT ANY WARRANTY. No author or distributor accepts
- ;; responsibility to anyone for the consequences of using it or for
- ;; whether it serves any particular purpose or works at all, unless he
- ;; says so in writing. Refer to the GNU Emacs General Public License
- ;; for full details. You should consider this code to be covered under
- ;; the terms of the GPL.
-
- ;; Everyone is granted permission to copy, modify and redistribute
- ;; this file, but only under the conditions described in the GNU Emacs
- ;; General Public License. A copy of this license is supposed to have
- ;; been given to you along with GNU Emacs so you can know your rights
- ;; and responsibilities. It should be in a file named COPYING. Among
- ;; other things, the copyright notice and this notice must be
- ;; preserved on all copies.
-
- ;; History
- ;;
- ;; In August 1993, I posted version 1.0.1 and called it superman19.el.
- ;; At the time I wasn't aware that the man.el in V19 was based on
- ;; superman.el. This is version 1.2. It basically just renames
- ;; everything to work properly with the V19 man.el. The file name has
- ;; changed to man-frames.el and the version number bumped up to 1.2,
- ;; mostly because that's what RCS is calling it :-)
-
- (require 'man)
-
- (defvar Man-frame-parameters nil
- "*Frame parameter list passed to make-frame when creating a new frame
- for manual page.")
-
- (defvar Man-notify 'newframe
- "*Selects the behavior when manpage is ready.
- This variable may have one of the following values:
-
- 'newframe -- put the manpage in its own frame (see variable Man-frame-parameters)
- 'bully -- make the manpage the current buffer and only window
- 'aggressive -- make the manpage the current buffer in the other window
- 'friendly -- display manpage in other window but don't make current
- 'polite -- don't display manpage, but prints message when ready (beeps)
- 'quiet -- like 'polite, but don't beep
- 'meek -- make no indication that manpage is ready
-
- Any other value of Man-notify is equivalent to 'meek.")
-
- (defun Man-notify-when-ready (man-buffer)
- "Notify the user when MAN-BUFFER is ready.
- See the variable `Man-notify' for the different notification behaviors."
- (cond
- ((eq Man-notify 'newframe)
- (set-buffer man-buffer)
- (new-frame Man-frame-parameters))
- ((eq Man-notify 'bully)
- (pop-to-buffer man-buffer)
- (delete-other-windows))
- ((eq Man-notify 'aggressive)
- (pop-to-buffer man-buffer))
- ((eq Man-notify 'friendly)
- (display-buffer man-buffer 'not-this-window))
- ((eq Man-notify 'polite)
- (beep)
- (message "Manual buffer %s is ready." (buffer-name man-buffer)))
- ((eq Man-notify 'quiet)
- (message "Manual buffer %s is ready." (buffer-name man-buffer)))
- ((or (eq Man-notify 'meek)
- t)
- (message ""))
- ))
-
- (provide 'man-frames)
-